class code3 {
    public boolean CheckPermutation(String s1, String s2) {
        char[] ss1 = s1.toCharArray();
        char[] ss2 = s2.toCharArray();
        int[] hash = new int[26];
        for(char s:ss1) {
            hash[s-'a']++;
        }
        for(char s:ss2) {
            hash[s-'a']--;
            if(hash[s-'a']<0) return false;
        }
        for(int x:hash) {
            if(x!=0) return false;
        }
        return true;
    }
}